<template>
  <el-config-provider :locale="locale">
    <router-view/>
  </el-config-provider>

</template>
<script setup>
import { computed } from 'vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'
import { useStore } from 'vuex'

const store = useStore()

// element-plus 的语言包
const locale = computed(() => (store.getters.language === 'zh' ? zhCn : en))

</script>
<style lang="scss" scoped>

</style>
